<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:h="http://java.sun.com/jsf/html"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../templates/StaffTemplate.xhtml">

    <ui:define name="nav_menu">
        <p:menubar model="#{staffChangeInitialPasswordManagedBean.staffMenuModel}"/>
    </ui:define>
    <ui:define name="content">
        <h:form>
            <p:panel id="panel" header="Search">
                <h:panelGrid columns="2" >
                    <h:outputLabel for="user" style="font-weight: bold" value="Email Username: " />
                    <h:inputText required="true" label="Subject" 
                                 id="user" value="#{sendEmailBean.user}">                   
                    </h:inputText>
                    <p:message for="user" />
                    <br/>                    
                    <h:outputLabel for="password" style="font-weight: bold" value="Email Password: " />
                    <h:inputSecret required="true" label="Password" 
                                   id="password" value="#{sendEmailBean.password}">                   
                    </h:inputSecret>
                    <p:message for="password" />
                    <br/>
                    <h:outputLabel for="subject" style="font-weight: bold" value="Subject: " />
                    <h:inputText required="true" label="Subject" 
                                 requiredMessage="Subject is required" id="subject" value="#{sendEmailBean.subject}">                   
                    </h:inputText>
                    <p:message for="subject" />
                    <br/>
                    <h:outputLabel for="message" style="font-weight: bold" value="Message: " />
                    <h:inputTextarea rows="15" cols="30" required="true" label="Message" 
                                     requiredMessage="Mesage to be sent to stakeholders" id="message" value="#{sendEmailBean.message}">                   
                    </h:inputTextarea>                              
                    <p:message for="message" />
                    <br/>
                </h:panelGrid>
                <p:commandButton id="btn" value="Send Email" action="searchStakeholder?faces-redirect=true" update="panel" actionListener="#{sendEmailBean.sendEmail}" />
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>

